<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">

<h:body>
	<ui:composition template="/WEB-INF/template/template_default.xhtml">
		<ui:define name="content">
			<h1>Games</h1>		
		
			<div id="lista_produtos">
				<table>
					<ui:repeat value="#{produtoBean.listaProdutosPorCatalogo(5)}" var="produto">
					
						<tr>
								<td><h:graphicImage value="#{produto.picture}" width="150" height="150" /></td>	
							<td>
								<div style="text-align: center; "><h:outputText value="#{produto.name}"/></div>
							
								<div style="padding-top: 6px;">
									<h:outputText value="#{produto.description}" />
								</div>
							</td>
							<td style="border: none">
									<h:form style="display:inline;">
										<h:commandLink actionListener="#{carrinhoBean.inserir(produto.id)}" value="Add" /> 
									</h:form>
							</td>
						</tr>
						
					</ui:repeat>
				</table>
			</div>

		</ui:define>
	</ui:composition>
</h:body>
</html>